Intravenous fluid pump monitor

ABSTRACT

A microprocessor-based controller for regulating the operation of a fluid pump motor is disclosed, wherein the controller includes a protection circuit which prevents fluid over- or under-delivery conditions from occurring by shutting down the pump motor whenever the actual speed of the pump motor differs from a desired pump motor speed by more than a predetermined amount. A simulation means interconnected with the protection circuit simulates fluid over- or under-delivery conditions to test the accuracy of protection circuit operation.

TECHNICAL FIELD

The present invention is directed to a system for monitoring theoperation of a parenteral fluid delivery pump and more particularlyconcerns a system which compares the rotational speed of a pump steppingmotor with an optimum speed setting representing a desired fluiddelivery rate in order to provide an indication of unacceptable fluidover-or under-delivery conditions.

BACKGROUND ART

Considerable attention has been focused in recent years on intravenousand intraarterial delivery of fluids to patients. Precision control overthe rate at which such parenteral delivery occurs is of criticalimportance, inasmuch as improper administration of fluids can retard therecovery of patients or, in extreme situations, lead to further injuryor even death. Early parenteral delivery systems relied on gravity flowto transfer fluid from a fluid container or reservoir to the patient.Attempts to accurately regulate gravity flow, however, proved difficultbecause the pressure forcing the fluid between the reservoir and thepatient decreased as the fluid level within the reservoir dropped duringthe delivery operation. Thus, delivery rates in gravity-flow systemstended to vary in an unacceptable manner.

More recent parenteral delivery systems have employed pump motors in aneffort to increase fluid delivery rate accuracy. Often, the pump motorscomprise stepping motors which drive plunger or piston-like fluid pumpsin response to suitable stepping motor control procedures. Theseprocedures are highly compatible with the precision control requirementsof parenteral administration because they provide the necessary degreeof accuracy and are capable of implementation through reliable andefficient microprocessor programming techniques. U.S. Pat. Nos.4,037,598 issued to Georgi on July 26, 1977; 3,994,294 issued to Knuteon Nov. 30, 1976; 3,985,133 issued to Jenkins et al on Oct. 12, 1976,and 3,736,930 issued to Georgi on June 5, 1973 all disclose intravenousdelivery systems wherein stepping motors are utilized in conjunctionwith camming mechanisms and pumping structures to achieve accuratedelivery rate control. Despite the advantages offered by prior artsystems, however, certain improvements in the delivery of fluid from astepping motor-driven fluid pump can be made. For example, it is highlybeneficial to provide some means for monitoring the operation of thestepping motor in order to insure that the stepping motor does not"run-away" or deviate from a preselected operating speed by more than apredetermined amount. In this manner, over- or under-delivery of fluidto the patient, as well as the risk of serious injury attendanttherewith, can be avoided.

DISCLOSURE OF THE INVENTION

It is accordingly the object of the present invention to furnish acontrol procedure for monitoring the operation of a pump motor in aparenteral fluid delivery system.

It is another object of the present invention to furnish a means formonitoring the operation of a parenteral fluid pump motor wherein ameasure of the actual fluid delivery rate is obtained by detecting thepump motor speed and any deviation in pump motor speed in excess of apredetermined amount is subsequently used to provide a warning of fluidover- or under-delivery conditions.

It is yet another object of the present invention to construct a pumpmotor controller having a protection circuit which continuously comparesthe rotational speed of the pump motor with a predetermined optimumspeed setting representing a desired fluid delivery rate in order toprovide a warning of fluid over- or under-delivery conditions.

It is an additional object of the present invention to construct a pumpmotor controller having a protection circuit which functions to shutdown the pump motor whenever the ratio between the actual pump motorspeed and an optimum pump motor speed representing a desired fluiddelivery rate exceeds predetermined limits.

It is a further object of the present invention to construct a pumpmotor controller having a microprocessor for implementing motor controlprocedures and a protective circuit which independently detects errorsin the operation of the microprocessor.

It is an object of the present invention to provide a protection circuitfor a microprocessor-based fluid pump motor controller wherein theprotection circuit functions to shut down the pump motor whenever fluidover- or under-delivery conditions are encountered, the protectioncircuit including means to simulate fluid over- or under-deliveryconditions to test the accuracy of protection circuit operations.

These and other objects of the present invention are achieved by amicroprocessor-based motor controller employing a protection circuitcapable of detecting pump motor run-away, microprocessor malfunction andprogramming errors. The prevention circuit includes a first comparisonmeans which continuously measures actual pump motor rotational speedagainst an optimum speed setting representing the desired fluid deliveryrate. Whenever the actual pump motor speed deviates from the optimumpump motor speed by more than a predetermined amount, a first warningsignal is generated and the pump motor is shut down. The accuracy of thefirst comparison means can be tested using a selected motor controllertest procedure. A second comparison means in the prevention circuitcompares the fixed frequency of an output signal from the microprocessorwith the frequency of an independent reference signal. Whenever thefrequency of the output signal from the microprocessor deviates by morethan a predetermined amount from the frequency of the independentreference signal, such as occurs when the microprocessor ismalfunctioning, a second warning signal is generated. If subsequentreset of the microprocessor does not correct the malfunction, a suitablealarm wi11 follow.

BRIEF DESCRIPTION OF THE DRAWINGS

The various objects, features and advantages of the present inventioncan best be understood by examining the following Brief Description OfThe Drawings and Best Mode For Carrying Out The Invention, wherein:

FIG. 1 is a perspective view illustrating the parenteral delivery systemof the present invention;

FIG. 2 is a cross-sectional view of a pumping cassette, valve steppingmotor and main stepping motor utilized in the parenteral delivery systemof FIG. 1;

FIG. 3 schematically depicts the motor controller which governs theoperation of the valve stepping motor and main stepping motor of FIG. 2;

FIG. 4 schematically depicts the pump motor runaway prevention circuitof the present invention;

FIG. 5 illustrates an electromechanical means for measuring therotational frequency or speed of the main stepping motor disclosed inFIG. 2;

FIG. 6 is a detailed circuit diagram showing a dedicated hardwareversion of the run-away prevention circuit of FIG. 4;

FIG. 7 is an alternate embodiment of a comparator circuit for use withthe pump motor run-away prevention circuit of FIG. 6;

FIG. 8 is a third embodiment of a comparator circuit for use with thepump motor run-away prevention circuit of FIG. 6; and

FIGS. 9A and 9B illustrate in flow chart form the program steps employedto stimulate fluid over-delivery and under-delivery conditions duringtesting of the run-way prevention circuit of FIG. 6.

BEST MODE FOR CARRYING OUT THE INVENTION

One type of parenteral fluid metering device for delivering controlledamounts of fluid to a patient is schematically illustrated in FIGS. 1and 2. Basic and improved embodiments of the fluid metering device aredisclosed in co-pending application Ser. Nos. 174,666 and 278,954,respectively filed Aug. 1, 1980 and June 30, 1981. Both of theseco-pending applications are assigned to the assignee of the presentinvention and both are incorporated herein by reference. For purposes ofunderstanding the present invention, the following brief description ofthe improved parenteral fluid metering device of application Ser. No.278,954 will suffice. Referring first to FIG. 1, the fluid meteringdevice 2 is shown positioned within a metering device control unit 4. Anin-flow conduit 6 on fluid metering device 2 is connected to a containerof fluid 8 by means of conventional tubing 10. Tubing 12, extending fromout-flow conduit 14 of the fluid metering device 2, transfers preciseamounts of fluid to the patient being treated in response to actuationof a stepping motor and camming mechanism (not shown in FIG. 1) housedin control unit 4.

Turning to FIG. 2, the construction of the fluid metering device 2, aswell as the stepping motor and camming mechanism, is shown in greaterdetail. Fluid metering device 2 includes a hollow cassette structure 16having a pumping chamber 18 disposed therein. A resilient diaphragm 20is secured across the top of pumping chamber 18. An inlet port 22 at oneend of passageway 24 formed in gas retention conduit 26 permits fluid topass from a gas retention chamber 28 into pumping chamber 18. Gasretention chamber 28 in turn fluidically communicates with in-flowconduit 6 through an intermediate passageway 30. A valve actuator 32operatively connected to valve stepping motor 34 via a cam and shaftmechanism 36, 38 controls the admission of fluid into pumping chamber 18by displacing a portion 40 of resilient diaphragm 20 positioned aboveinlet port 22. Current is supplied to valve stepping motor 34 by a powercontrol center 42 which may be alternately connected to an AC powersupply 44 or a battery supply 46. Valve stepping motor 34 is driventhrough a series of incremental steps in response to commands receivedfrom motor controller 48, whereupon valve actuator 32 reciprocates tomove the diaphragm portion 40 between an open position, as indicated bysolid lines in FIG. 2, and a sealing engagement with a valve seat 50formed around the periphery of inlet port 22, as indicated in phantom inFIG. 2. A biasing means such as spring 52 seated on hollow boss 54formed in control unit 4 provides the necessary force for urging valveactuator 32 into positive contact with the camming surface 56 of cam 36.

An outlet port 58 is formed in pumping chamber 18 opposite inlet port22. Outlet port 58 communicates with outlet conduit 14 through anintermediate passageway 60. A ball check 62 is mounted between outletport 58 and intermediate passageway 60. A biasing means such as spring64 urges the ball check into sealing engagement with a valve seat 66formed around the periphery of outlet port 58. A projection 68 formed onresilient diaphragm 20 opposite ball check 62 displaces the ball checkfrom valve seat 66 during pump priming operations. A manual latch valve70 is used to move projection 68 into contact with the ball check.

Motive power for pumping fluid through the cassette 16 of fluid meteringdevice 2 is supplied by a plunger 72 operatively connected to a mainstepping motor 74 via a cam and shaft mechanism 76, 78. Main steppingmotor 74 also receives current from power control center 42 under thecommand of motor controller 48. One end 80 of plunger 72 contactsresilient diaphragm 20 while the remaining end 82 is urged into positivecontact with the camming surface 84 of cam 76 by a biasing means such asspring 86 seated on hollow boss 88 of control unit 4. The incremental orstep rotation of main stepping motor 74, and hence of cam 76, drivesplunger 72 in a reciprocal fashion between a fully retracted position,indicated by solid lines in FIG. 2, and a fully extended positionindicated in phantom at 90 in FIG. 2. Resilient diaphragm 20 flexes inresponse to the reciprocal motion of plunger 72 to periodically vary thevolume of pumping chamber 18, thereby providing the pumping actionnecessary to drive a metered amount of fluid from the pumping chamberinto the fluid outflow conduit 14.

As previously indicated, valve stepping motor 34 and main stepping motor74 are both under the command of motor controller 48. The motorcontroller, which is schematically illustrated in FIG. 3, includes amicroprocessor 92 connected by a data link 94 to a read-only-memory 96.Suitable control procedures for the valve stepping motor 34 and the mainstepping motor 74 are stored in the read-only-memory 96 and supplied tomicroprocessor 92 on demand. The microprocessor in turn directs a pairof octal latches 97, 98 to drive the valve stepping motor and the mainstepping motor respectively through their incremental steps inaccordance with the control procedures stored in the read-only-memory. Amultiplexer 100 is connected to various data sensors such as the plungerpressure transducer (not shown) disclosed in aforementioned Ser. No.278,954. An A/D converter 102 converts the signals from multiplexer 100into a form useable by microprocessor 92 and feeds the signals soconverted to the microprocessor via data link 103. A "watch-dog" or pumpmotor run-away prevention circuit 104 is tied to the microprocessor viadata link 106. The purpose of pump motor run-away prevention circuit 104is to monitor the activity of the main stepping motor 74 and to providean alarm when the speed of the main stepping motor exceeds predeterminedupper or lower limits, indicating the occurrence of potentiallydangerous over- or under-delivery conditions. Motor controller 48 andthe stepping motor control procedures are disclosed in greater detail incopending application Ser. No. 314,038, filed Oct. 22, 1981, andincorporated herein by reference. Pump motor run-away prevention circuit104 is disclosed in greater detail below.

The pumping operation of fluid metering device 2 will now be described.Returning to FIG. 2, it can be seen that incoming fluid transmitted bytubing 10 to fluid inflow conduit 6 passes into gas retention chamber28, whereupon any gases otherwise present in the fluid are preventedfrom reaching pumping chamber 18 by the presence of gas retentionconduit 26. Liquid free of gas bubbles next travels from the gasretention chamber 28 through passageway 24 to inlet port 22. During therefill phase of each pumping cycle, valve stepping motor 34 operates toreciprocate valve actuator 32 upwardly, allowing fluid free of gasbubbles to pass through the inlet port into pumping chamber 18. Shortlythereafter, plunger 72 is reciprocated upwardly by main stepping motor74 to increase the volume and reduce the pressure within pumping chamber18, aiding the flow of fluid through the inlet port. The spring-loadedball check 62 seated against valve seat 66 effectively closes off outletport 58 while valve actuator 32 is in the open position. Accordingly, nofluid can leak into fluid out-flow conduit 14 during the refill phase ofthe pumping cycle and precise control over the amount of fluid to bepumped from pumping chamber 18 is maintained. After a brief interval inthe open position, valve actuator 32 is moved to a closed position.Plunger 72 is then reciprocated downwardly as described hereinabove todecrease the volume within pumping chamber 18. As the volume within thepumping chamber decreases, the pressure within the pumping chamberincreases to overcome the bias exerted by spring 64 against ball check62 and a precise amount of metered fluid is pumped from pumping chamber18 through out-flow conduit 14 and tubing 12 to the patient. The fluidpressure necessary to open ball check 62 is determined in large part bythe spring constant of spring 64.

It should here be noted that the fluid metering device 2 of FIG. 2operates in one of three distinct modes, each of which modes has aparticular or desired fluid delivery rate associated therewith. In thefirst or normal operating mode of the fluid metering device, fluid isdelivered at a preselected rate set into motor controller 48 via athumbwheel switch (not shown) on control unit 4 of FIG. 1. Thispreselected rate may, for example, vary from 0 to 999 milliliters perhour depending upon the needs of the individual patient receiving thefluid. The second operating mode of the fluid metering device is akeep-vein-open mode designed to deliver a minimal amount of fluid to thevenous entrance site in the patient when the first or normal operatingmode has been completed or when the fluid level in reservoir 8 reaches apredetermined lower limit, thereby preventing clotting or occlusion ofthe IV needle (not shown) at the end of tubing 12. The keep-vein-openmode is initiated in response to either a low fluid level alarm (notshown) or an end of dosage indication, whereupon motor controller 48drives main stepping motor 74 at a predetermined low speed to provide apredetermined low or KVO delivery rate. The final operating mode of thefluid metering device is the stop mode in which main stepping motor 74is deenergized and no fluid is delivered to the patient. The stop mode,of course, is characterized by a zero fluid delivery rate.

The pump motor run-away prevention circuit discussed in connection withFIG. 3 is schematically depicted in FIG. 4. Pump motor run-awayprevention circuit 104 includes a computing means 108 supplied witheither a preselected rate setting, KVO signal or a stop signalrepresenting the desired rate of fluid delivery from fluid meteringdevice 2. Computing means 108 thereafter generates a first indicatorhaving at least one parameter which varies in accordance with the valueof the desired fluid delivery rate. A second indicator having at leastone parameter which varies in accordance with the value of the actualrate of fluid delivery from the fluid metering device is generated by asensing means 110. The first and second indicators are simultaneouslydirected to a comparator means 112 and compared with one another. Ifthis comparison is within acceptable limits, i.e., if the actual fluiddelivery rate has not deivated from the desired fluid delivery rate bymore than a predetermined amount, safe fluid delivery conditions areassumed and motor controller 48 continues to drive main stepping motor74 in normal fashion. If, by way of contrast, the actual fluid deliveryrate does deivate from the desired fluid delivery rate by more than thepredetermined amount, evidencing a potentially dangerous fluid over- orunder-delivery condition, comparator means 112 will not detect a propercomparison between the first and second indicators. An error signal isthen generated in the comparator means and supplied to an error latch114. In response to the error signal, error latch 114 outputs an alarmsignal which may then be used to turn off the voltage supplied by powercontrol center 42 to main stepping motor 74, shutting the main steppingmotor down. The alarm signal from the error latch may also serve toactivate an audio or visual warning of the fluid over- or under-deliverycondition.

The comparison scheme of FIG. 4 may be implemented in either software ordedicated hardware form. A circuit structure specifically designed fordedicated hardware implementation of the comparison scheme isillustrated in FIGS. 5 through 8. FIG. 5 in particular discloses onetype of electromechanical arrangement suitable for use as the sensingmeans 110 of FIG. 4, wherein the rotational frequency or speed of themain stepping motor 74 is measured to provide an indication of theactual fluid delivery rate of the fluid metering device. A flange orflag 116 having a slot 118 formed therein is positioned on the shaft 78connecting main stepping motor 74 with cam 76. An optical interruptormodule 120 comprising an LED 122 positioned on one side of flange 116and a photodetector 124 positioned opposite LED 122 on the other side offlange 116 is connected to the microprocessor 92 in motor controller 48.During the operation of fluid metering device 2, LED 122 is illuminated.As main stepping motor 74 is driven through its incremental steps, thepresence of flange 116 serves to block radiation generated by LED 122from reaching photodetector 124. Once during each revolution of the mainstepping motor, however, slot 118 will move into alignment with theoptical interruptor module 120 and radiation leaving LED 122 willimpinge upon photodetector 124. The resultant output from thephotodetector is used by the optical interruptor module to generate aFLAG pulse on lead 126. Continued rotation of main stepping motor 74produces a train of FLAG pulses on lead 126, with each pulse in thetrain representing a single revolution of the main stepping motor. Thus,the FLAG pulse train serves as a count for determining the number ofrevolutions made by the main stepping motor during any given period oftime. The total number of revolutions during the given time period inturn corresponds to the actual rate of fluid delivery from fluidmetering device 2, and can be compared with a count representing thedesired fluid delivery rate in order to determine whether the actualfluid delivery rate is within acceptable limits.

FIG. 6 illustrates a dedicated hardware circuit capable of bothgenerating the count representing the desired fluid delivery rate andcomparing the count so generated with the count from the opticalinterruptor module 120 of FIG. 5. The desired fluid delivery rate countis derived by dividing a base count obtained from an independent clock128. Independent clock 128 includes a 400KHz oscillator/counter 132which provides a 6.25KHz signal on lead 134. The independent operationof oscillator/counter 132 relative to the internal clock ofmicroprocessor 92 prevents any microprocessor malfunction from affectingthe reliability of the run-away prevention circuit operation. The6.25KHz signal on lead 134 is used to clock a series of rate multipliers136, 138 and 140. The data inputs to the rate multipliers are suppliedvia data line 142 with signals respectively representing the hundreds,tens, and ones digits of the preselected rate setting on the controlunit thumbwheel switch (not shown). The value of the hundreds, tens andones digits are also read from the thumbwheel switch by microprocessor92 (not shown in FIG. 6). Rate multipliers 136, 138 and 140 areconnected to one another in conventional cascade fashion, therebyproviding lead 144 with a high rate output having a relatively highfrequency proportional to the preselected rate setting. In the preferredembodiment of the present invention, this relatively high frequency maybe expressed as:

    f.sub.h =Rate Setting/1,000×6.25KHz

where Rate Setting represents the entry on the thumbwheel switch. Itshould also be noted that a fixed, low frequency or KVO output issupplied by rate multipliers 136, 138 and 140 along lead 146. The latteroutput is used as a reference when fluid metering device 2 is in akeep-vein-open mode.

The high rate output on lead 144 passes to a first dividing counter 148and is converted to an intermediate rate output having an intermediatefrequency still proportional to the preselected rate setting. Thisintermediate frequency may be varied by a factor of ten depending uponthe position of switch 150. Hence, the pump motor run-away preventioncircuit of the present invention may be accomodated to pediatric fluiddelivery rates, which are generally smaller than adult fluid deliveryrates by a factor of ten. The intermediate rate output generated bycounter 148 serves as one input to a NOR gate 152, while the KVO outputon lead 146 serves as one output to NOR gate 154. The remaining inputsto the two NOR gates are supplied by a KVO-ENABLE logic signal on lead156 from microprocessor 92 in accordance with the operating mode of thefluid metering device. Assuming for the moment that the fluid meteringdevice is operating in a normal mode to administer fluid at thepreselected delivery rate, the KVO-ENABLE signal from microprocessor 92is low. Inverter 158 switches the KVO-ENABLE signal high, whereupon NORgate 154 is disabled and no KVO output from rate multiplier 140 reachesOR gate 160. The same high signal which disables NOR gate 154 is alsopassed through inverter 161 before reaching NOR gate 152, with the netresult that NOR gate 152 is enabled to pass the intermediate rate outputfrom counter 148 to OR gate 160. Subsequently, the intermediate rateoutput drives a second dividing counter 162 such as a divide-by-224counter to provide a RATE pulse train having a frequency suitable forcomparison with the frequency of the FLAG pulse train from the opticalinterruptor module 120 of FIG. 4. The RATE pulse train frequency is, ofcourse, proportional to the desired rate of fluid delivery from fluidmetering device 2, in this case the preselected rate associated with thenormal operating mode of the fluid metering device.

When, in contrast, fluid metering device 2 is operating in akeep-vein-open mode, the high KVO-ENABLE signal supplied frommicroprocessor 92 disables NOR gate 152 to block the intermediate rateoutput leaving counter 148 while NOR gate 154 is enabled to pass the KVOoutput to OR gate 160. Counter 162 again provides a RATE pulse train forcomparison purposes, but the frequency of the RATE pulse train is nowproportional to the KVO rate associated with the keep-vein-open mode.

The RATE pulse train generated by counter 162 is supplied via lead 164to a first or run-away comparator means 166 comprising a pair of binarycounters 168 and 170. The clock input to binary counter 168 is connectedto receive the RATE pulse from lead 164, while the clock input to binarycounter 170 is connected to receive the FLAG pulse train from lead 126of optical interruptor module 120 (not shown in FIG. 6). Binary counters168 and 170 are multi-stage components such as National SemiconductorCD4520 counters, each having at least four output stages Q₀, Q₁, Q₂ andQ₃. The Q₁ and Q₃ output of each binary counter 168, 170 is connected toan associated one of a pair of NAND gates 171, 172. NAND gates 171, 172in turn respectively supply one input to triple input NOR gates 174,176. The second input to NOR gate 174 is connected to the Q₃ output ofbinary counter 170, while the second input to NOR gate 176 is connectedto the Q₃ output of binary counter 168. Run-away comparator means 166also comprises a reset circuit 178 including a NAND gate 180 which isdriven by the output of either NAND gate 171 or NAND 172 to supply aRESET pulse through RC delay 182 and series inverters 184, 186. TheRESET pulse operates to reset binary counters 168 and 170, and alsofurnishes the remaining input for each triple-input NOR gate 174 and176. The NOR gates 174 and 176 are connected through NOR gate 188 to theinverting input of an error latch 190.

The operation of run-away comparator 166 will now be described.Insertion of the fluid metering device cassette 16 (not shown in FIG. 6)into control unit 4 triggers a switch (not shown) to provide a highoutput on lead 192. This high output passes through RC delay 182 inseries inverters 184, 186 of reset circuit 178 and, after an interval oftime determined by the RC time constant of delay 182, acts to reset bothbinary counters 168 and 170. Thereafter, the incoming RATE pulse trainon lead 164, representing the desired rate of fluid delivery from thefluid metering device, clocks counter 168 through a series of outputstates as a function of the RATE pulse train frequency. The Q₀ -Q₃outputs of counter 168 are consequently switched between variouscombinations of high and low values to provide a binary count of theRATE pulses which reach counter 168 following the RESET pulse. That is,the first RATE pulse switches the Q₀ output of counter 168 high to forma 0001 binary count, the second RATE pulse switches the Q₁ output ofcounter 168 high to form a 0010 binary count, the third RATE pulseswitches both the Q₀ and Q₁ outputs of counter 168 high to form a 0011binary count, and so on. A similar binary count appears on the Q₀ -Q₃outputs of binary counter 170 in response to the FLAG pulse train onlead 126, which FLAG pulse train represents the actual rate of fluiddelivery from the fluid metering device.

Throughout the first nine RATE pulses, the Q₁ and Q₃ outputs of binarycounter 168 alternate between high and low values as previouslyindicated. Simultaneous switching of the Q₁ and Q₃ outputs to highvalues, however, does not occur until the tenth RATE pulse, i.e., untilcounter 168 reaches the binary count 1010. The output from NAND gate 171accordingly remains high to disable triple-input NOR gate 174 for eachof the first nine RATE pulses, and the signal from NOR gate 174 to NORgate 188 remains low. FLAG pulses contemporaneously arriving on lead 126from the optical interruptor module 120 of FIG. 4 likewise switch the Q₁and Q₃ outputs of binary counter 170 between alternating high and lowvalues, but until the occurance of the tenth FLAG pulse following thecounter reset, the output of NAND gate 172 also remains high to disabletriple-input NOR gate 176. The attendant low output from NOR gate 176,together with the aforementioned low output from NOR gate 174, force NORgate 188 high to prevent the setting of the error latch 190.

When the tenth RATE pulse clocks binary counter 168, NAND gate 171 isdriven low, removing an otherwise disabling input to NOR gate 174. Atthe same time, the output of NAND gate 180 in reset circuit 178 isswitched high to generate another RESET pulse. The presence of RC delay182 in the reset circuit prevents the RESET pulse from reaching binarycounters 168 and 170 for a short interval. During this short interval,the status of binary counter 170 is monitored. If at least eight FLAGpulses have appeared on lead 126, the Q₃ output of counter 170 will behigh and NOR gate 174 remains disabled despite the low output from NANDgate 171. The high output from NOR gate 188 prevents setting of theerror latch 190, keeping the error latch Q output low. If, on the otherhand, a motor or microprocessor malfunction slows the operation of mainstepping motor 74 sufficiently, less than eight FLAG pulses will haveclocked counter 170 and the Q₃ output thereof will remain low. NOR gate174 will then switch high to drive the output of NOR gate 188 low,causing error latch 190 to generate a high Q output which may besupplied on lead 194 to a voltage regulator (not shown) in power controlcenter 42. The high Q output from the error latch, which serves as analarm signal indicative of slow motor speed and hence of potential fluidunder-delivery conditions, causes the voltage regulator to output zerovolts to main stepping motor 74. This zero voltage output, of course,shuts down main stepping motor 74 to stop the delivery of fluid fromfluid metering device 2. Microprocessor 92 can, if desired, monitor lead194 in order to generate an error code when the Q output of error latch190 is high. The high Q alarm signal may also trigger an audio or visualalarm circuit (not shown), alerting the operator of the fluid meteringdevice to the existence of under-delievery conditions.

Where fluid over-delivery conditions exist, FLAG pulses arrive at binarycounter 170 with greater frequency than the RATE pulses arriving atbinary counter 168. Hence, counter 170 will be the first counter toreach a binary ten count, driving the output of NAND gate 172 low andforcing reset circuit 178 to generate a delayed RESET pulse. Unless theQ₃ output of counter 168 at this point is high, indicating at least abinary eight count of the incoming RATE pulses, triple-input NOR gate176 will switch high to drive the output of NOR gate 188 low. Errorlatch 190 will thereafter output a high Q value to provide an alarmsignal as previously described.

Following the short interval defined by the time constant of RC delay182, binary counters 168 and 170 are reset by the RESET pulse generatedin response to the low output from either NAND gate 171 or NAND gate172. The RESET pulse also disables triple-input NOR gates 174 and 176during the resetting operation to prevent spurious tripping of the errorlatch 190. Binary counting of both the FLAG and RATE pulses thenresumes, with another high Q output from error latch 190 appearing onlead 194 whenever the ratio of the FLAG pulse count to the RATE pulsecount falls below 0.8 or rises above 1.25, i.e., whenever the ratio liesoutside the range between 8/10 and 10/8. Of course, as long as the FLAGor RATE pulses do not lag behind one another by more than the specifiedeight-to-ten ratio, i.e., as long as the actual fluid delivery rate doesnot deviate from the desired fluid delivery rate beyond thepredetermined limits, no alarm signal will occur.

Microprocessor 92 (not shown in FIG. 6) may be designed to simulatefluid over- or under-delivery conditions in order to test the accuracyof comparator means 166 when fluid metering device 2 is not in use. Inthe case of a simulated fluid over-delivery condition, lead 196 isdriven low by the microprocessor, whereupon inverter 198 supplies theset pin of each rate multiplier 136, 138 and 140 with a high signal tostop the operation of the rate multipliers. Simultaneously, the lowsignal on lead 196 acts via lead 199 to stop the operation of counters148 and 162. The RATE pulse train leaving counter 162 effectivelyceases, shutting down the operation of binary counter 168 in comparatormeans 166. Main stepping motor 74 (not shown in FIG. 6) is rotated untilthe slot 118 in flange 116 is brought into alignment with the opticalinterruptor module 120 discussed in connection with FIG. 4. LED 122 inthe optical interruptor module is then pulsed at an arbitrarily highvalue by the microprocessor in order to generate a FLAG pulse train. TheFLAG pulses clock counter 170 in comparison means 166, generating Q₁ andQ₃ outputs which drive the output of NAND gate 172 low following thetenth FLAG pulse. Because no RATE pulses are being generated, however,the Q₃ output of counter 168 remains low as the output of NAND gate 172switches low. Thus, a fluid over-delivery condition has been simulatedand the output of triple-input NOR gate 174 should switch high, forcingthe output of NOR gate 188 low to trip error latch 190 and provide analarm signal on lead 194. If the alarm signal does not appear, amalfunction in comparator means 166 is indicated and an independentstorage device such as a RAM (not shown) in microprocessor 92 may beemployed to record this fact. When normal operation of the motorcontroller is resumed, the malfunction data may be read out of the RAMand used to trigger an audible or visual alarm. A flow chartillustrating fluid over-delivery simulations can be seen in FIG. 9A.

Fluid under-delivery conditions may be simulated as depicted in FIG. 9Bby keeping the signal on lead 196 high while holding main stepping motor74 stationary in order to prevent pulsing of the output fromphotodetector 124. RATE pulses from the rate multipliers 136-140 andcounters 140, 162 accordingly continue to be delivered to comparisonmeans 166 in a normal fashion but the FLAG pulses from the opticalinterruptor module cease. Subsequent operation of the comparison meansshould yield an alarm signal indicative of the simulated under-deliverycondition, inasmuch as the Q₃ output of binary counter 170 should remainlow when the binary count of counter 168 reaches ten to trip error latch190 and generate an alarm signal on lead 194 in the manner previouslydescribed. Again, the failure of an alarm signal to appear is indicativeof comparison means malfunction and data reflecting such failure can bestored by the microprocessor for later use.

The operation of the microprocessor itself may be monitored with asecond or hardware comparison means 200. Hardware comparison means 200is both structurally and functionally identical to run-away comparisonmeans 168, and includes paired multi-stage binary counters 202, 204respectively connected to drive a pair of NAND gates 206, 208, whichpaired NAND gates in turn respectively gate triple-input NOR gates 210,212 in response to the comparison between the binary count of counters202 and 204. Reset circuit 214, including NAND gate 216, RC delay 218and series inverters 220, 222, is connected to reset binary counters 202and 204 at the end of each ten count sequence. NOR gate 224 connected toNOR gates 210 and 212 supplies a low signal on lead 226 whenever theratio between the binary count accumulated in counter 202 and binarycount accumulated in counter 204 falls outside of the predetermined8/10-10/8 range. A counter 228 is clocked by a signal on lead 230 fromcounter 132 to generate an independent clock signal having a frequency,for example, of 195 Hz. The independent clock signal is connected vialead 232 to the clock input of binary counter 202 while a fixedfrequency signal from the microprocessor, optimally having the same 195Hz frequency as the independent clock signal, is connected via lead 234to the clock input of binary counter 204. As long as the microprocessoris functioning properly, the frequency of the signal clocking counter204 should track the independent clock signal within the limits set byhardware comparison circuit 200, and the output of NOR gate 224 shouldremain high. If, on the other hand, some hardware malfunction in themicroprocessor occurs, or if some programming error exists in themicroprocessor software, the microprocessor will generally be effectedto the extent that the frequency of the fixed frequency signal clockingcounter 204 increases or decreases beyond the point necessary to drivethe output of NOR gate 224 low. This low NOR gate output can then beused to initiate protective measures in the motor controller, such asresetting the microprocessor or sounding an alarm.

An alternate embodiment of a comparator means suitable for use as eitherthe first or second comparator means 166, 200 of FIG. 6, can be seen inFIG. 7. Comparator means 238 includes a pair of multi-stage binarycounters 240, 242 which, when comparator means 238 is employed in lieuof runaway comparator means 166 in FIG. 6, are respectively clocked bythe RATE pulse train and the FLAG pulse train. Both of the binarycounters 240, 242 have at least four output stages, Q₀ -Q₃, and the Q₂and Q₃ outputs of each counter are connected to an associated one of apair of AND gates 244, 246. In addition, the Q₃ output from each binarycounter is connected to one input of a NAND gate 248. The outputs of ANDgates 244, 246 are supplied to a triple-input NOR gate 250. NOR gate 250is in turn connected to drive a reset circuit 252 and an inverter 254connected to the clock input of a JK flip-flop 256. Reset circuit 252includes a RC delay 258 and an inverter 260. The J input of flip-flop256 is supplied by NAND gate 248. The circuitry of comparator means 238is completed by lead 262 which supplies a resetting pulse to both theremaining inputs of triple-input NOR gate 250 and the reset input offlip-flop 256 whenever the cassette 16 (not shown in FIG. 7) of fluidmetering device 2 is first inserted into the metering device controlunit 4 (also not shown in FIG. 7).

The operation of comparator means 238 of FIG. 7 proceeds in generallythe same fashion as the operation of comparator means 166 and 200 ofFIG. 6. The insertion of the cassette into the metering device controlunit, as discussed above, produces a pulse from cassette switch on lead262, which pulse resets flip-flop 256 and momentarily switches theoutput of NOR gate 250 low to generate a RESET pulse at inverter 260.The RESET pulse clears binary counters 240 and 242. Thereafter, incomingRATE and FLAG pulses respectively clock the counters until one or theother of the counters reaches a binary count of twelve (1100), whereuponthe Q₂ and Q₃ outputs of that counter simultaneously switch high. Theassociated AND gate 244 or 246 likewise switches high to drive theoutput of NOR gate 250 low, forcing inverter 254 high to clock flip-flop256 and causing reset circuit 252 to generate a RESET pulse which resetsthe comparator means following the interval determined by RC delay 258.If, at the point NOR gate 250 is driven low, the count at the remainingbinary counter has reached at least eight (1000), the Q₃ output thereofwill be high and an "and" condition will appear at NAND gate 248. Theconsequent low output from NAND gate 248, which is supplied to the Jinput of flip-flop 256, produces a corresponding low Q output as theflip-flop is clocked, indicating the existence of an acceptable ratiobetween the RATE and FLAG pulses. Due to the fact that the Q₂ and Q₃output stages of binary counters 240 and 242 are now employed toregister the incoming pulse train counts, this ratio is a 8/12 or 2/3ratio, as opposed to the 8/10 ratio of FIG. 6. Of course, where onebinary counter 240 or 242 has not yet reached at least an eight count bythe time the other counter reaches twelve, the low Q₃ output from theslower counter will produce a high signal from NAND gate 248 to the Jinput of flip-flop 256 when the flip-flop is clocked. The correspondinghigh Q output from the flip-flop then serves as an indication of anunacceptable deviation of the actual main stepping motor speed from theoptimum or desired main stepping motor speed. The Q output can beremoved from flip-flop 256 via lead 264 to yield a warning of fluidoveror under-delivery conditions. If desired, the Q0 output may also beremoved from flip-flop 256 via lead 266 and used as a second control orindicating signal by the microprocessor.

FIG. 8 illustrates yet another embodiment of the comparator means 200 ofFIG. 6, wherein an OR gate 268 has been inserted in lead 262 of thecomparator means. OR gate 268 is also supplied via lead 270 with theoutput of reset circuit 252. It can be seen that the RESET pulseoccurring when either of the binary counters 240 or 242 reaches atwenty-four count acts to reset flip-flop 256, thereby preventing anyspurious tripping of the flip-flop during the resetting of the binarycounters.

The present invention has been set forth in the form of severalpreferred embodiments. Modifications to the pump motor run-awayprevention circuit disclosed herein may nevertheless be made by thoseskilled in the art without departing from the spirit and scope of thepresent invention. For instance, the pump motor run-away preventioncircuit may be accomodated for use with a main stepping motor whichrotates in reciprocal fashion rather than in continuous fashion. Thatis, the main stepping motor 74 of FIGS. 1-3 can be designed to shiftthrough incremental steps in a forward direction to turn cam 76 andreciprocate plunger 72 through its downward stroke, while the upwardstroke of the plunger is accomplished by reversing the motor directionat the half-revolution point and shifting the motor back through theearlier incremental step positions in reverse order or fashion. In thereciprocating motor arrangement, slot 118 in flange 116 will align withLED 122 and photodetector 124 twice during each single pumping cycle,and the resulting FLAG pulses from optical interruptor module 120 willoccur at a frequency equal to twice the pumping cycle frequency.Suitable adjustment of either the rate multipliers 136-140, or the firstand second counters 148, 162 of the pump motor run-away preventioncircuit, will produce a RATE pulse train having a frequency compatiblewith the doubled frequency of the FLAG pulses.

Other modifications to the pump motor run-way circuit of the presentinvention may be made as well by those skilled in the art, it beingunderstood that all such modifications are considered to be within thepurview of the appended claims.

What is claimed is:
 1. An apparatus for monitoring the speed of a fluidpump motor which rotates under the command of a controller circuit toeffect delivery of fluid from a fluid metering device and for generatingan alarm signal whenever the actual motor speed deviates from a desiredmotor speed by more than a predetermined amount, said apparatuscomprising:sensing means for sensing the actual speed of the motor andfor generating a first signal which represents the actual motor speedwhen the motor is rotating; computing means connected to receive datainput indicative of a desired fluid delivery rate and for generating asecond signal representative of the desired motor speed necessary toachieve the desired fluid delivery rate; comparator means for receivingsaid first and second signals and for comparing said first and secondsignals with one another in order to provide the alarm signal wheneverthe ratio of said first and second signals falls outside a predeterminedrange; and simultation means operable when the motor is stopped tosupply said computing means and said sensing means with a first set ofsimulation signals which interrupt said computing means to prevent saidsecond signal from being generated while causing said sensing means togenerate said first signal such that said ratio of said first and secondsignals falls outside said predetermined range, said simulation meansalso operable to supply said computing means and said sensing means witha second set of simulation signals which prevent said sensing means forgenerating said first signal while permitting said computing means togenerate said second signal such that the ratio of said first and secondsignals likewise falls outside said predetermined range.
 2. An apparatusas set forth in claim 1, wherein said simulation means includes amicroprocessor which also functions as part of the controller circuitryto generate command signals for the motor, said microsprocessoroperating to supply said first and second sets of simulation signals,and wherein said simulation means further includes a means for storing amalfunction signal when said comparator means fails to generate thealarm signal during operation of said simulation means.